import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Preview from '../views/preview/Preview.vue'
import Answer from '../views/answer/Answer.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/preview',
      name: 'preview',
      component: Preview
    },
    {
      path: '/s/:id',
      name: 'answer',
      component: Answer
    },
  ]
})

export default router
